package org.petstore.persistence;

import org.petstore.util.CartItem;

import java.util.List;

public interface ShoppingCartDAO {
    /**
     * description TODO
     *
     * @param username:
     * @param list:
     * @return void
     * @author huangzhangyan
     * @date 2022/1/10 15:15
     */
    void store(String username, List<CartItem> list);

    /**
     * description 获取用户的购物车的List<CartItem>
     *
     * @param username:
     * @return List<CartItem>
     * @author huangzhangyan
     * @date 2022/1/10 15:16
     */
    List<CartItem> getCartList(String username);

    /**
     * description 删除用户的购物车
     *
     * @param username:
     * @return void
     * @author huangzhangyan
     * @date 2022/1/10 15:16
     */
    void deleteCart(String username);

    /**
     * description 获取用户购物车
     *
     * @param username:
     * @return List<CartItem>
     * @author huangzhangyan
     * @date 2022/1/10 15:17
     */
    List<CartItem> getCart(String username);
}
